#include "world.h"
#include <stdlib.h>

void dd_world_emptyupdate(void *w) {};
void dd_world_emptydraw(void *w) {};
void dd_world_emptykey(void *w, SDL_Scancode k, int s) {};
void dd_world_emptymouse(void *w, int x, int y, int m, int n) {};
void dd_world_emptyclick(void *w, int x, int y) {};

// initialise an abstract world
void dd_world_init(struct dd_world *w) {
	w->update = dd_world_emptyupdate;
	w->draw = dd_world_emptydraw;
	w->key = dd_world_emptykey;
	w->mouse = dd_world_emptymouse;
	w->click = dd_world_emptyclick;
	w->next = 0;
}

// create an abstract world
struct dd_world *dd_world_create() {
	struct dd_world *w = malloc(sizeof(struct dd_world));
	dd_world_init(w);
	return w;
}
